package com.hodgepodge.sso;

import com.alibaba.csp.sentinel.annotation.aspectj.SentinelResourceAspect;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

/**
 * title WebApplication
 * projectName colorful-blog
 * desc 启动类
 *
 * @author jiangjian
 * @date 2020/9/20 14:38
 */
@MapperScan("com.hodgepodge.api.mapper")
@ComponentScan(basePackages = {
        "com.hodgepodge.sso",
        "com.hodgepodge.api.service",
        "com.hodgepodge.commons.exception"
})
@EnableDiscoveryClient
@SpringBootApplication
public class SsoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SsoApplication.class, args);
    }

    @Bean
    public SentinelResourceAspect sentinelResourceAspect() {
        return new SentinelResourceAspect();
    }

}
